<?php
/**
 * Header Template
 *
 * Here we setup all logic and HTML that is required for the header section of all screens.
 *
 */
 global $woo_options;
 global $woocommerce;
?>

<?php 
	$http_or_https = (is_ssl()) ? 'https:' : 'http:';	
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html <?php language_attributes(); ?> class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
<head profile="http://gmpg.org/xfn/11">

<title><?php woo_title(); ?></title>
<?php woo_meta(); ?>

<!-- The main stylesheet -->
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/style.css">

<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php $GLOBALS['feedurl'] = get_option('woo_feed_url'); if ( !empty($feedurl) ) { echo $feedurl; } else { echo get_bloginfo_rss('rss2_url'); } ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<!-- Load Modernizr which enables HTML5 elements & feature detects -->
<script src="<?php echo get_template_directory_uri(); ?>/includes/js/libs/modernizr-2.0.6.min.js"></script>	
      
<?php wp_head(); ?>
<?php woo_head(); ?>

<!-- Load Google HTML5 shim to provide support for <IE9 -->
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<script type='text/javascript' src='/../wp-content/plugins/woocommerce/assets/js/frontend/single-product.min.js?ver=3.5'></script>

<?php // NoIndex / NoFollow For Training Guide Posts, Shop Orders
	if (in_category(array(923, 924, 925, 926, 927, 928, 936))) { ?>
    	<meta name="robots" content="noindex,nofollow" />
    <?php } elseif (is_category(array(923, 924, 925, 926, 927, 928, 936))) { ?>
    	<meta name="robots" content="noindex,nofollow" />
    <?php } elseif (( 'shop_order' == get_post_type() )) { ?>
        <meta name="robots" content="noindex,nofollow" />
    <?php } elseif (( 'revision' == get_post_type() )) { ?>
        <meta name="robots" content="noindex,nofollow" />
    <?php } elseif (( 'autosave' == get_post_type() )) { ?>
        <meta name="robots" content="noindex,nofollow" />
    <?php } elseif (is_page(array(28527, 28537))) { ?>
        <meta name="robots" content="noindex,nofollow" />
    <?php } elseif (is_search()) { ?>
        <meta name="robots" content="noindex,nofollow" />
    <?php } ?>
        
<?php if(is_page(28899)) { ?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" ></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#filter").keyup(function(){
 
        // Retrieve the input field text and reset the count to zero
        var filter = $(this).val(), count = 0;
 
        // Loop through the comment list
        $(".pricelisttable tbody tr").each(function(){
 
            // If the list item does not contain the text phrase fade it out
            if ($(this).text().search(new RegExp(filter, "i")) < 0) {
                $(this).fadeOut();
 
            // Show the list item if the phrase matches and increase the count by 1
            } else {
                $(this).show();
                count++;
            }
        });
 
        // Update the count
        var numberItems = count;
        $("#filter-count").text("Number of Comments = "+count);
    });
});
</script>
<?php } ?>

<?php if(is_page(27110)) { ?>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){
    $("#filter").keyup(function(){
 
        // Retrieve the input field text and reset the count to zero
        var filter = $(this).val(), count = 0;
 
        // Loop through the comment list
        $("ul.wp-tag-cloud li").each(function(){
 
            // If the list item does not contain the text phrase fade it out
            if ($(this).text().search(new RegExp(filter, "i")) < 0) {
                $(this).fadeOut();
 
            // Show the list item if the phrase matches and increase the count by 1
            } else {
                $(this).show();
                count++;
            }
        });
 
        // Update the count
        var numberItems = count;
        $("#filter-count").text("Number of Comments = "+count);
    });
});
</script>
<?php } ?>

<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/sortable.js"></script>

<!--Start of Zopim Live Chat Script-->
<script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//cdn.zopim.com/?48jisasVaoGC8fr4ZEsaymfhhduTHyK0';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
</script>
<!--End of Zopim Live Chat Script-->

<?php if(is_page(23009)) { ?>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<?php } ?>
<?php if(is_page(29338)) { ?>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<?php } ?>

</head>

<body <?php body_class(get_option('woo_site_layout')); ?> class="single single-product">
<?php woo_top(); ?>

<div id="wrapper">

	<?php if ( function_exists( 'has_nav_menu') && has_nav_menu( 'top-menu' ) ) { ?>
	
    <?php /** Original WooStore Top Bar Layout - Modified Below - Removed Mar 2013
	<div id="top">
		<div class="col-full">
			<?php wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'top-nav', 'menu_class' => 'nav fl', 'theme_location' => 'top-menu' ) ); ?>
		</div>
	</div><!-- /#top -->
	**/ ?>
    
    <!-- New Top Bar Layout - Matt B - Mar 2013 -->
    <div id="top">
    	<div class="col-full">
    		<div id="topLeft">
        		<h1><a href="http://www.siliconsolar.com">Solar Panels, Fountains, Solar Lights, Thin Film Panels</a></h1>
        	</div>
			<div id="topRight">
				<?php wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'top-nav', 'menu_class' => 'nav fl', 'theme_location' => 'top-menu' ) ); ?>
			</div>
        </div>
	</div><!-- /#top -->
    <!-- End New Top Bar Layout Modifications -->

    <?php } ?>

	<div id="header" class="col-full">

		<div id="logo">

		<a href="http://www.siliconsolar.com">
        	<img src="/../wp-content/uploads/2013/03/siliconsolar-logo2.jpg" alt="Silicon Solar Online Store" style="max-width:100%;" />
        </a>

		</div><!-- /#logo -->
		
        <!-- New Header Center Div For Search Box - Matt B - Mar 2013 -->
        <div id="headerCenter">

			<div id="search-top" style="width:350px;margin-left:auto;margin-right:auto;float:none;">
				<img src="/wp-content/themes/woostore/images/header-search-top-image.jpg" alt="Silicon Solar - No Hassle Returns &amp; Price Match Guarantee" style="max-width:350px;" />
            	<?php if ( is_active_sidebar( 'header-search' ) ) { ?>
				<?php dynamic_sidebar( 'header-search' ); ?>
			<?php } else { ?>
				<form id="fr_pp_search_widget_9" class="fr_search_widget" style="margin-left:auto;margin-right:auto;" method="get" action="http://www.siliconsolar.com/woocommerce-search/" autocomplete="off">
					<div class="ctr_search">
					<input id="pp_course_9" class="txt_livesearch ac_input_9" type="text" name="rs" value="" onFocus="if (this.value == '') {this.value = '';}" onBlur="if (this.value == '') {this.value = '';}" autocomplete="off">
					<span id="bt_pp_search_9" class="bt_search"></span>
                    </div>
					<input type="hidden" value="product" name="search_in">
					<input type="hidden" value="product" name="search_other">
				</form>
			<?php } ?>
                <img src="/wp-content/themes/woostore/images/header-search-bottom-image.jpg" alt="Silicon Solar - Family Owned Since 1997" style="max-width:350px;" />
            </div>

        </div>
        <!-- End New Header Center Div -->
        
		<div id="headerRight">
        
        	<!-- New Location For The WooCommerce Included Cart & Account Nav Menu -->
            
			<?php if ( is_woocommerce_activated() ) { ?>

			<div id="headerCart">

	        <div id="btn-cart" class="fr">
	        	<a href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>">
					<span> 
					<?php 
					echo sprintf(_n('%d item &ndash; ', '%d items &ndash; ', $woocommerce->cart->get_cart_contents_count(), 'woothemes'), $woocommerce->cart->get_cart_contents_count());
					echo $woocommerce->cart->get_cart_total();
					?>
					</span>
				</a>
	        </div>
	        
	        <ul id="account-nav" class="nav fr">
	        
	        <li class="account">
	        	<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('Account','woothemes'); ?></a>
	        </li>
	        <?php
	        if (sizeof($woocommerce->cart->cart_contents)>0) :
	        echo '<li class="checkout"><a href="'.$woocommerce->cart->get_checkout_url().'">'.__('Checkout','woothemes').'</a></li>';
	    	endif; 
	    	?>
	    	
	    	</ul>

    	<?php } ?>
        
        	</div>
        
        <!-- End New Location For WooCommerce Account & Cart Nav Menu -->
	    
        	<?php /** MOVED HIGHER IN THE TEMPLATE - Matt B - MAR 2013
	    	<form role="search" method="get" id="searchform" class="searchform" action="<?php echo home_url(); ?>">
				<label class="screen-reader-text" for="s"><?php _e('Search for:', 'woothemes'); ?></label>
				<input type="text" value="<?php the_search_query(); ?>" name="s" id="s"  class="field s" placeholder="<?php _e('Search', 'woothemes'); ?>" />
				<input type="image" class="submit btn" name="submit" value="<?php _e('Search', 'woothemes'); ?>" src="<?php echo get_template_directory_uri(); ?>/images/ico-search.png">
				<?php if ($woo_options['woo_header_search_scope'] == 'products' ) { echo '<input type="hidden" name="post_type" value="product" />'; } else { echo '<input type="hidden" name="post_type" value="post" />'; } ?>	
			</form>
			<div class="fix"></div>
			**/ ?>
            
            <!-- New Content - Phone / Contact / Social Buttons - Matt B - Mar 2013 -->
            	<span class="big red">Questions?</span> <span class="big">Call Us Today!</span>
                <p><span class="blue">1.800.786.0329</span> | <span>M-F 8a to 530p EST</span></p>
                <?php include '/home/silicons/public_html/wp-content/themes/woostore/header-include-social-block.php'; ?>
                <?php /**
                <ul class="headersocialbuttons">
                	<!--
                    <li style="width:80px;vertical-align:top;"><div class="fb-like" data-href="http://www.facebook.com/SiliconSolar" data-send="false" data-layout="button_count" data-width="80" data-show-faces="false" data-font="arial"></div></li>
                    <li style="width:80px;vertical-align:top;"><div class="g-plusone" data-size="tall" data-annotation="inline" data-width="120" data-href="http://www.siliconsolar.com"></div></li>
                	-->
                    <li><a href="http://www.facebook.com/SiliconSolar"><img src="/wp-content/themes/woostore/images/ico-social-facebook.png" alt="Find Us On Facebook" width="30"></a></li>
                    <!--<li><a href="#"><img src="/../wp-content/themes/woostore/images/ico-social-twitter.png" alt="Follow Us On Twitter" width="30" /></a></li>-->
                    <li><a href="http://www.linkedin.com/company/silicon-solar-inc."><img src="/wp-content/themes/woostore/images/ico-social-linkedin.png" alt="Network With Us On LinkedIn" width="30"></a></li>
                    <li><a href="https://plus.google.com/b/100947798815486107103/" rel="publisher"><img src="/wp-content/themes/woostore/images/ico-social-googleplus.png" alt="Join Us On Google Plus" width="30"></a></li>
                    <li><a href="http://www.youtube.com/user/siliconsolar"><img src="/wp-content/themes/woostore/images/ico-social-youtube.png" alt="Check Out Our YouTube Videos" width="30"></a></li>
                </ul>
                **/ ?>
            <!-- End New Content -->
			
		</div><!-- /#headerRight -->

	</div><!-- /#header -->
	
	<div id="container" class="col-full">

	<div id="navigation" class="col-full">
		<div id="nav-home" class="fl"><a href="<?php bloginfo('url'); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/ico-home-active.png" alt="" /></a></div>
		<?php
		if ( function_exists( 'has_nav_menu') && has_nav_menu( 'primary-menu') ) {
			wp_nav_menu( array( 'depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fl', 'theme_location' => 'primary-menu' ) );
		} else {
		?>
        <ul id="main-nav" class="nav fl">
			<?php
        	if ( isset($woo_options[ 'woo_custom_nav_menu' ]) AND $woo_options[ 'woo_custom_nav_menu' ] == 'true' ) {
        		if ( function_exists( 'woo_custom_navigation_output') )
					woo_custom_navigation_output();
			} else { ?>
	            <?php if ( is_page() ) $highlight = "page_item"; else $highlight = "page_item current_page_item"; ?>
	            <li class="<?php echo $highlight; ?>"><a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Home', 'woothemes' ) ?></a></li>
	            <?php
	    			wp_list_pages( 'sort_column=menu_order&depth=6&title_li=&exclude=' );
			}
			?>
        </ul><!-- /#nav -->
        <?php } ?>
        
        <?php /** Moved Higher Up In The Header Template - Matt B - Mar 2013
        <?php if ( is_woocommerce_activated() ) { ?>

	        <div id="btn-cart" class="fr">
	        	<a href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php _e('View your shopping cart', 'woothemes'); ?>">
					<span> 
					<?php 
					echo sprintf(_n('%d item &ndash; ', '%d items &ndash; ', $woocommerce->cart->get_cart_contents_count(), 'woothemes'), $woocommerce->cart->get_cart_contents_count());
					echo $woocommerce->cart->get_cart_total();
					?>
					</span>
				</a>
	        </div>
	        
	        <ul id="account-nav" class="nav fr">
	        
	        <li class="account">
	        	<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('Account','woothemes'); ?></a>
	        </li>
	        <?php
	        if (sizeof($woocommerce->cart->cart_contents)>0) :
	        echo '<li class="checkout"><a href="'.$woocommerce->cart->get_checkout_url().'">'.__('Checkout','woothemes').'</a></li>';
	    	endif; 
	    	?>
	    	
	    	</ul>

    	<?php } ?>
		**/ ?>

	</div><!-- /#navigation -->
    <div id="websitebanner" style="clear:both;width:100%;background:#f2f2f2;">
        	<a href="/../shipping-rates-and-delivery-times.html">
        		<img src="/../wp-content/themes/woostore/images/solarsignlightsfreeshipping.gif" alt="Free Shipping From Silicon Solar" style="max-width:100%;height:auto;" />
        	</a>
        </div>
        
     <?php // include '/wp-content/themes/woostore/breadcrumbs.php'; ?>